package com.zrrd.tree;

import com.zrrd.tree.BinaryTree.Node;

public class TestBinaryTree {
    public static void main(String[] args) {
        Node A = new Node("A");
        Node B = new Node("B");
        Node C = new Node("C");
        Node D = new Node("D");
        Node E = new Node("E");
        Node F = new Node("F");
        Node G = new Node("G");
        Node H = new Node("H");
        Node I = new Node("I");
        Node J = new Node("J");
        A.lChild = B;
        A.rChild = C;
        B.lChild = D;
        D.lChild = G;
        D.rChild = H;
        C.lChild = E;
        C.rChild = F;
        E.rChild = I;
        F.rChild = J;
        BinaryTree binaryTree = new BinaryTree();
        // binaryTree.levelOrderTraversal(A);
        //binaryTree.firstOrderTraversal(A);
        //binaryTree.middleOrderTraversal(A);
        //binaryTree.lastOrderTraversal(A);
    }
}
